package managers;

import java.sql.SQLException;
import java.util.List;

import stores.FoglaloStore;
import stores.FoglaloStoreImpl;
import workspace.Workspace;
import beans.Foglalo;

public class FoglaloManagerImpl implements FoglaloManager {

	private FoglaloStore foglaloStore = new FoglaloStoreImpl();

	@Override
	public List<Foglalo> loadFoglaloLista(Workspace workspace)
			throws SQLException {
		return foglaloStore.loadFoglaloLista(workspace);
	}

	@Override
	public Foglalo insertFoglalo(Workspace workspace, Foglalo newFoglalo)
			throws SQLException {
		return foglaloStore.insertFoglalo(workspace, newFoglalo);
	}

	@Override
	public Foglalo updateFoglalo(Workspace workspace, Foglalo updatedFoglalo)
			throws SQLException {
		return foglaloStore.updateFoglalo(workspace, updatedFoglalo);
	}

	@Override
	public boolean deleteFoglalo(Workspace workspace, long userId)
			throws SQLException {
		return foglaloStore.deleteFoglalo(workspace, userId);
	}

	@Override
	public boolean deleteFoglaloForTest(Workspace workspace, long id)
			throws SQLException {
		return foglaloStore.deleteFoglaloForTest(workspace, id);
	}

}
